package duckandturkey;

import duckandturkey.duck.Duck;
import duckandturkey.duck.TurkeyToDuckAdapter;
import duckandturkey.turkey.WildTurkey;

/**
 * description:
 *  利用鸭子和火鸡来描述适配器模式
 * @author yuanmenglv on 2019/11/30
 */
public class Client {
    public static void main(String[] args) {
        //this is a turkey
        WildTurkey wildTurkey = new WildTurkey();
        //now, it is a duck
        Duck turkeyToDuckAdapter = new TurkeyToDuckAdapter(wildTurkey);

        turkeyToDuckAdapter.quack();
        turkeyToDuckAdapter.fly();

    }
}
